<%-- 
    Document   : header
    Created on : Apr 21, 2012, 10:35:04 AM
    Author     : acer
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page trimDirectiveWhitespaces="true" %>

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>GAG-NESHA - School of Gag and Fun</title>
    <link id="cssfile" href="style1.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="home.js"></script>
    <script type="text/javascript" src="csspopup.js"></script>
    <script type="text/javascript" src="post.js"></script>
    <script type="text/javascript" src="content.js"></script>
    <script type="text/javascript" src="list-content.js"></script>
  </head>
  <body>
    <!-- Header -->
    <div id="blanket" style="display:none;"></div>
    <div id="popUpDiv" style="display:none;">
      Username: <input class="inputbox" type="text" name="uname"/> <br />
      Password: <input class="inputbox" type="password" name="pass"/> <br />
      <input class="button" id="loginButton" type="button" value="Log in" onclick="javascript:ajaxLogin()" /> <br />
      <a class ="button" href="register.jsp" >Don't have account? Register Now</a> <br />
      <a class="button" id="closelogin" href="#" onclick="popup('popUpDiv')">CloseBox</a> <br />
    </div>
    <div id="header">
      <div id="logo">
        <a href="index.jsp">
          <img class="logoimage" src="logo.png" alt="Logo"/>
        </a>
      </div>
      <div id="judul">
        <h1>Gag-Nesha</h1>
        <p>School of Gag and Fun</p>
      </div>
      <div id="searchbox">
        <form method="get" action="search.jsp">
          <input id="search" type="text" name="q" value="Search here..." />
          <input class="button" type="submit" value="Search"/><br />
          <span id="filtertext">Filter:</span>
          <input type="radio" name="search_type" value="all" checked="true"/> all
          <input type="radio" name="search_type" value="username" /> username
          <input type="radio" name="search_type" value="content" /> content
        </form>
      </div>
      <div id="menu">
        <ul>
          <li><a href="index.jsp">Home</a></li>
          <li><a href="list-content.jsp">Content</a></li>
          <li><a href="post.jsp">Post</a></li>
          <%
            if (session.getAttribute("userid") != null) {
          %>
          <li>
            <%
              out.write("<a href=\"profile.jsp?id=");
              out.write(session.getAttribute("userid").toString());
              out.write("\">");
              out.write("Hi, " + session.getAttribute("uname").toString());
              out.write("</a>");
            %>
          </li>
          <li><img class="avatar" src="avatar/<%= session.getAttribute("avatar") %>" alt="avatar" width="30px" height="30px" /></li>
          <li><a href="logout.jsp">Log Out</a></li>
          <%
          } else {
          %>
          <li><a id="login" href="#" onclick="show()">Register/Log In</a></li>
          <%                          }

          %>
          <!--<li>
                <a href="javascript:popup('popUpDiv')">Log In</a>
          </li>-->
          <!--<li><a href="javascript:popup('popUpDiv')">Log in</a></li>-->

          <!--
          <li>Ganti tema:
            <select name="tema">
                  <option value="pilih">Pilih tema...</option>
                  <option value="klasik">Metalik</option>
                  <option value="pelangi">Pelangi</option>
            </select>
          </li>
          -->
        </ul>
      </div>
    </div>
